<template>
  <el-dialog
    title="发布活动"
    center
    width="40%"
    :visible="showDialog"
    @close="closeDialog"
  >
    <div class="dialog">
      <el-button class="dialog-btn" @click="routeTo">
        <img class="dialog-img" src="@/assets/imgs/index/logo.png" alt="" />
        <p style="font-size: 22px">线上活动</p>
      </el-button>
      <el-button class="dialog-btn" @click="routeTo">
        <img class="dialog-img" src="@/assets/imgs/index/logo.png" alt="" />
        <p style="font-size: 22px">线下活动</p>
      </el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: "z-activity",
  props: {
    showDialog: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {

    }
  },
  computed: {
    visible: {
      set (val) {
        this.$emit("update:showDialog", val)
      },
      get () {
        return this.showDialog
      }
    }
  },
  created () {

  },
  methods: {
    routeTo () {
      this.$emit("update:showDialog", false)
      this.$router.push("/activity/publish")
    },
    closeDialog () {
      this.$emit("update:showDialog", false)
    }
  }
}

</script>
<style scoped lang='scss'>
.dialog {
  display: flex;
  justify-content: space-around;
  .dialog-btn {
    width: 50%;
    height: 300px;
    border-radius: 20px;
    border: 0;
    .dialog-img {
      border-radius: 50%;
      margin-bottom: 50px;
    }
  }
}
</style>